<!DOCTYPE html>

<html>
	{include file="public/header" /}

	<body>
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-header">网站设置</div>
						<div class="layui-card-body" pad15>
							<div class="layui-form" wid100 lay-filter="">
								<div class="layui-form-item">
									<label class="layui-form-label">网站名称</label>
									<div class="layui-input-block">
										<input type="text" name="SystemName" value="{$data.SystemName}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">公司名称</label>
									<div class="layui-input-block">
										<input type="text" name="CompanyName" value="{$data.CompanyName}" class="layui-input">
									</div>
								</div>

							
								<div class="layui-form-item">
									<label class="layui-form-label">乙方（出借人）</label>
									<div class="layui-input-block">
										<input type="text" name="yifang" value="{$data.yifang}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">身份证号码：（身份证）</label>
									<div class="layui-input-block">
										<input type="text" name="shenfenzheng" value="{$data.shenfenzheng}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">丙方（信息技术服务方）：</label>
									<div class="layui-input-block">
										<input type="text" name="bingfang" value="{$data.bingfang}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">丁方（资金居间方）</label>
									<div class="layui-input-block">
										<input type="text" name="dingfang" value="{$data.dingfang}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">系统机审分</label>
									<div class="layui-input-block">
										<input type="text" name="jishenfen" value="{$data.jishenfen}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">系统人工分</label>
									<div class="layui-input-block">
										<input type="text" name="rengongfen" value="{$data.rengongfen}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">最大年龄</label>
									<div class="layui-input-block">
										<input type="text" name="MaxAges" value="{$data.MaxAges}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">最小年龄</label>
									<div class="layui-input-block">
										<input type="text" name="MinAges" value="{$data.MinAges}" class="layui-input">
									</div>
								</div>


								{eq name="$Request.session.info.RoleID" value="1"}
								<div class="layui-form-item">
									<label class="layui-form-label" lay-tips='个人对账栏目 统计订单的催回金额(还款金额)限制统计还款的时间段'>个人对账还款时间设置?</label>
									<div class="layui-input-block">
										<input type="text" name="repayment_time" value="{$data.repayment_time}" id="test6" class="layui-input">
									</div>
								</div>

	                          <div class="layui-form-item">
									<label class="layui-form-label">网站域名</label>
									<div class="layui-input-block">
										<input type="text" name="SystemDomain" lay-verify="url" value="{$data.SystemDomain}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">短信签名</label>
									<div class="layui-input-block">
										<input type="text" name="duanxinqianming" value="{$data.duanxinqianming}" class="layui-input">
									</div>
								</div>
								
								{else/} {/eq}
								<div class="layui-form-item">
									<label class="layui-form-label">客服选择</label>
									<div class="layui-input-inline">
										<select name="KefuType">
											{eq name="data.KefuType" value="1"}
											<option value="1" selected="selected">QQ</option>
											<option value="2">微信</option>
										<!--	<option value="3">电话</option>-->
											{else/}
											<option value="1">QQ</option>
											<option value="2" selected="selected">微信</option>
											<!--<option value="3">电话</option>-->
											
											{/eq}
										</select>
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">客服qq</label>
									<div class="layui-input-block">
										<input type="text" name="QQ" value="{$data.QQ}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">客服微信</label>
									<div class="layui-input-block">
										<input type="text" name="WeChat" value="{$data.WeChat}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">客服电话</label>
									<div class="layui-input-block">
										<input type="text" name="Tel" value="{$data.Tel}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">app下载地址</label>
									<div class="layui-input-block">
										<input type="text" name="Downurl" lay-verify="url" value="{$data.Downurl}" class="layui-input">
									</div>
								</div>
								

								{eq name="$Request.session.info.RoleID" value="1"}
								<div class="layui-form-item">
									<label class="layui-form-label">逾期计费截至天数</label>
									<div class="layui-input-block">
										<input type="text" name="yuqijifeidays" lay-verify="" value="{$data.yuqijifeidays}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">用户未认证额度</label>
									<div class="layui-input-block">
										<input type="text" name="weimoney" lay-verify="" value="{$data.weimoney}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">是否允许提交订单</label>
									<div class="layui-input-inline">
										{eq name="data.order" value="1"}
										<input type="checkbox" lay-filter="switch" name="order" lay-skin="switch" lay-text="允许|不允许" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="order" lay-skin="switch" lay-text="允许|不允许"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">自动分配催收客服</label>
									<a href="">开启:订单应还当天系统自动分配催收客服 关闭:无操作 订单需要后台手动分配催收客服
									</a>
									<div class="layui-input-inline">
										{eq name="data.cuishouren" value="1"}
										<input type="checkbox" lay-filter="switch" name="cuishouren" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="cuishouren" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">当日到期自动代扣开关</label>
									<a href="">开启:系统每天自动执行  9:30从用户绑定银行卡中扣除应还金额 10:30分从扣除展期金额
									</a>
									<div class="layui-input-inline">
										{eq name="data.daikou" value="1"}
										<input type="checkbox" lay-filter="switch" name="daikou" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="daikou" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">支付环境</label>
									<div class="layui-input-inline">
										{eq name="data.Payceshi" value="1"}
										<input type="checkbox" lay-filter="switch" name="Payceshi" lay-skin="switch" lay-text="正式|测试" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="Payceshi" lay-skin="switch" lay-text="正式|测试"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">自动放款开关</label>
									<div class="layui-input-inline">
										{eq name="data.zdfk" value="1"}
										<input type="checkbox" lay-filter="switch" name="zdfk" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="zdfk" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">开启支付宝支付</label>
									<div class="layui-input-inline">
										{eq name="data.isAlipay" value="1"}
										<input type="checkbox" lay-filter="switch" name="isAlipay" lay-skin="switch" lay-text="允许|不允许" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="isAlipay" lay-skin="switch" lay-text="允许|不允许"> {/eq}
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">开启微信支付</label>
									<div class="layui-input-inline">
										{eq name="data.isWx" value="1"}
										<input type="checkbox" lay-filter="switch" name="isWx" lay-skin="switch" lay-text="允许|不允许" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="isWx" lay-skin="switch" lay-text="允许|不允许"> {/eq}
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">开启银联支付</label>
									<div class="layui-input-inline">
										{eq name="data.isBank" value="1"}
										<input type="checkbox" lay-filter="switch" name="isBank" lay-skin="switch" lay-text="允许|不允许" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="isBank" lay-skin="switch" lay-text="允许|不允许"> {/eq}
									</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label">风控开关</label>
									<a href="">开启 新客户老客户都调用风控 // 关闭 新客户调用 老客户走根据静默时间和借款次数判断是否调用</a>
									<div class="layui-input-inline">
										{eq name="data.fengkong_kaiguan" value="1"}
										<input type="checkbox" lay-filter="switch" name="fengkong_kaiguan" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="fengkong_kaiguan" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">风控选择</label>
									<div class="layui-input-inline">
										<select name="fengkong">
											{eq name="data.fengkong" value="1"}
											<option value="1" selected="selected">滴滴</option>
											<option value="2">磨盘</option>
											{else/}
											<option value="1">滴滴</option>
											<option value="2" selected="selected">磨盘</option>
											{/eq}
										</select>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">手机认证</label>
									<div class="layui-input-inline">
										<select name="mobile_operator">
											<option value="1" {if ($data.mobile_operator == 1)}selected{/if}>魔蝎</option>
											<option value="2" {if ($data.mobile_operator == 2)}selected{/if}>新颜</option>
										</select>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">磨盘自动审核开关</label>
									<div class="layui-input-inline">
										{eq name="data.fengkong_mopan_kaiguan" value="1"}
										<input type="checkbox" lay-filter="switch" name="fengkong_mopan_kaiguan" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="fengkong_mopan_kaiguan" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">风控静默时间</label>
									<div class="layui-input-block">
										<input type="text" name="fengkong_time" value="{$data.fengkong_time}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">风控借款次数</label>
									<div class="layui-input-block">
										<input type="text" name="fengkong_nums" value="{$data.fengkong_nums}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label" lay-tips='当剩余余额处于提醒余额范围内 登陆弹窗提醒管理员充值'>提醒余额?</label>
									<div class="layui-input-block">
										<input type="text" name="BalanceInterval" value="{$data.BalanceInterval}" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label" lay-tips='开启 当可用余额消费完 短信/认证/风控将不再提供使用'><span style="color: red;">消费环境?</span></label>
									<div class="layui-input-block">
										{eq name="data.BalanceIsCheck" value="1"}
										<input type="checkbox" lay-filter="switch" name="BalanceIsCheck" lay-skin="switch" lay-text="开启|关闭" checked> {else/}
										<input type="checkbox" lay-filter="switch" name="BalanceIsCheck" lay-skin="switch" lay-text="开启|关闭"> {/eq}
									</div>
								</div>
								{else/} {/eq}
								
								<input type="hidden" name="ID" value="{$data.ID}" class="layui-input">
								<div class="layui-form-item">
									<div class="layui-input-block">
										<button class="layui-btn" lay-submit lay-filter="set_website">确认保存{$Request.session.info.RoleID}</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}
		<script>
			layui.use(['index', 'set','laydate'], function() {
				var $ = layui.$,
					setter = layui.setter,
					admin = layui.admin,
					form = layui.form,
					router = layui.router(),
					search = router.search,
					laydate = layui.laydate;

			  	//时间范围
				laydate.render({
					elem: '#test6'
					,type: 'time'
					,range: true
				});

				form.render();

				//提交
				form.on('submit(set_website)', function(obj) {
					//请求登入接口
					admin.req({
						url: "{:url('admin/xitong/edit_index')}",
						type:'post',
						data: obj.field,
						done: function(res) {

							//登入成功的提示与跳转
							layer.msg('更新成功', {
								offset: 'auto',
								icon: 1,
								time: 1000
							}, function() {
								location.href = "{:url('admin/xitong/index')}"; //后台主页
							});
						}
					});

				});
			});
		</script>
	</body>

</html>